<?php
/**
 * @developer Ngann Socheat
 * @website www.sruol.com
 * @copyright 2012
 */
if (!empty($_SESSION['username'])) {
    $select = "SELECT theme.images, iduser.cat_id,shorturl FROM tblpharmacy AS com 
INNER JOIN tbl_style AS theme ON com.user_id=theme.by_company_id 
INNER JOIN tbluser AS iduser ON iduser.`id` = com.user_id
WHERE com.email='" . $_SESSION['username'] . "' AND type_img=1";
    $run = mysql_query($select);
    while ($assoc_sel = mysql_fetch_array($run)) {
        $im = $assoc_sel['images'];
        $seller_cat = $assoc_sel['cat_id'];
        $last_word = $assoc_sel['shorturl'];
    }
    $select_img = "SELECT theme.images, iduser.cat_id,shorturl FROM tblpharmacy AS com 
INNER JOIN tbl_style AS theme ON com.user_id=theme.by_company_id 
INNER JOIN tbluser AS iduser ON iduser.id = com.user_id
WHERE com.email='" . $_SESSION['username'] . "' AND type_img=0";
    $im_company = mysql_query($select_img);
    $company_row = mysql_fetch_assoc($im_company);
    $company_im_display = $company_row["images"];
}

$edit_path = W_ROOT . '/company/edit.php';

//for personal page views
$company = new company();
$company->getcompany($last_word);
$company_name = $company->pharmacy_name;
$update_view_page = mysql_query("UPDATE tblpharmacy SET views = views+1 WHERE user_id='$company->user_id'");
// end personal page views
?>  
<div class="row-fluid">
    <div class="span12">
        <div class="header-seller">
            <h1><a href="<?php echo W_ROOT . '/' . $last_word; ?>"><?php echo $company_name; ?></a></h1>
        </div>
    </div>
</div> 
<style>.header-seller{background: url(company/images/sellerheader.jpg) no-repeat top left;height: 90px;border: 1px solid #5dc100;}
.header-seller h1 {padding: 15px 0 0 30px;}
.header-seller h1 a{font-size: 32px;text-transform:uppercase;text-shadow: 2px 1px 2px #000000;color:#fff}
</style>
<!-- End Header and Nav -->